package com.admission.model;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * 
 * ArrayInfo.java
 * 
 * 系统参数明细
 */
@Entity
@Table(name = "arrayinfo")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class ArrayInfo extends IdEntity {

	public static final String SCHOOLLIFE = "00000001";// 学校概况
	public static final String ONLINECONSULT = "00000002";// 在线咨询功能开关
	public static final String PROVINCE = "00000027";// 省
	public static final String TYPE = "00000028";//
	public static final String TEACHERCONSULT = "00000068";// 名师咨询
	public static final String COLLEGECONSULT = "00000069";// 高考录取
	public static final String ARTCONSULT = "00000070";// 美术录取
	public static final String SPORTCONSULT = "00000071";// 运动员报名
	public static final String ENVIRONMENT = "00000079";// 校园生活
	public static final String SPECIAL = "00000080";// 推荐栏名字
	public static final String SPECIALCONSULT="00000084";//专题开关
	public static final String TEACHERTYPE="00000085";//名师类别
	public static final String SPECIALATTACHMENT="00000090";//推荐pdf
	public static final String SPECIALSITE="00000091";//推荐链接
	public static final String SPORTENDDATE="00000095";//运动员报名截止时间
	public static final String PAYLOG="00000096";//美术报名缴费开关

	private String itemName;
	private String itemValue;
	private String summary;
	private int orderNo;// 排序用
	private List<ArrayInfo> arrayInfos;
	private ArrayInfo arrayInfo;

	@Column(unique = true)
	public String getItemName() {
		return itemName;
	}

	public void setItemName(String itemName) {
		this.itemName = itemName;
	}

	public String getItemValue() {
		return itemValue;
	}

	public void setItemValue(String itemValue) {
		this.itemValue = itemValue;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	@OneToMany(cascade = CascadeType.ALL, mappedBy = "arrayInfo")
	public List<ArrayInfo> getArrayInfos() {
		return arrayInfos;
	}

	public void setArrayInfos(List<ArrayInfo> arrayInfos) {
		this.arrayInfos = arrayInfos;
	}

	@ManyToOne
	@JoinColumn(name = "p_array_info")
	public ArrayInfo getArrayInfo() {
		return arrayInfo;
	}

	public void setArrayInfo(ArrayInfo arrayInfo) {
		this.arrayInfo = arrayInfo;
	}

	public int getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(int orderNo) {
		this.orderNo = orderNo;
	}

}
